FROM php:7.4-fpm

#ARG APP_CODE_PATH_MOUNT
#ARG TIMEZONE


# replace apt sources
RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
RUN apt-get clean

# install softwares
RUN apt-get update -y
RUN apt-get install -y vim
# RUN apt-get install -y wget
# RUN apt-get install -y zlib1g-dev
# RUN apt-get install -y libmemcached-dev
# RUN apt-get install -y imagemagick
# RUN apt-get install -y libmagickwand-dev
# RUN apt-get install -y libfreetype6-dev
# RUN apt-get install -y libjpeg62-turbo-dev
# RUN apt-get install -y libpng-dev
# RUN apt-get install -y libzip-dev
# RUN apt-get install -y libcurl4-openssl-dev
# RUN apt-get install -y pkg-config
# RUN apt-get install -y libssl-dev

# config timezone
#RUN ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
#RUN echo "${TIMEZONE}" > /etc/timezone


# install extensions
#RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install mysqli pdo_mysql
# RUN pecl install memcache-4.0.5.2
# RUN pecl install memcached-3.1.5
# RUN pecl install redis-5.3.4
# RUN pecl install mongodb-1.18.1
# RUN pecl install imagick-3.4.4
#RUN pecl install xdebug-3.1.2
#RUN docker-php-ext-enable memcache memcached redis mongodb imagick



#WORKDIR ${APP_CODE_PATH_MOUNT}

EXPOSE 9000
